import React, { Component } from 'react';
import store from '../../store'
import './my.scss'
import MouduleMy from './moduleMy/moduleMy'
import {Switch,Route} from 'react-router-dom'

class My extends Component {
  constructor(props) {
    super(props);
    const { history } = props
    const isLogin = store.getState().getIn(['userReducer', 'isLogin']);
    if (!isLogin && !localStorage.getItem('loginId')) {
      history.push('/login')
    }
  }
  render() {
    return (
      <div>
        <Switch>
          <Route path='/my'component={MouduleMy}/>
          {/* <Route path='/my/mycontent' exact component={MyContent}/> */}
          
        </Switch>
      </div>
    );
  }

  componentDidMount(){

  }
}

export default My
